import request from '/@/utils/request';
//驾驶舱数据
const getChartData = (params: any) => {
	return request({
		url: '/workYard/getChart',
		method: 'get',
		data: params,
	});
};

/**审核 */
//审核检查接口
const postCheckTask = (params: any) => {
	return request({
		url: '/sysTask/checkAudio',
		method: 'post',
		data: params,
	});
};
//审核任务列表
const getApprovalList = (params: any) => {
	return request({
		url: '/sysTask/page',
		method: 'get',
		data: params,
	});
};
//审核操作
//TODO:2022-12-15 20:57:05 待完成 审核操作,接口对接 测试
const postApprovalAction = (params: any) => {
	return request({
		url: '/sysTask/audio',
		method: 'post',
		data: params,
	});
};
//项目评审-审核操作
const postProjectReviewAction = (params: any) => {
	return request({
		url: '/rmShare/rmAudit',
		method: 'post',
		data: params,
	});
};

/**
 * 消息
 */
//查看当前待处理的消息与任务
const getWaitInfoCount = () => {
	return request({
		url: '/sysMessage/getUnRead',
		method: 'get',
	});
};
//获取消息列表
const getInfomationList = (params: any) => {
	return request({
		url: '/sysMessage/getPage',
		method: 'get',
		data: params,
	});
};
//已读操作 传0全部
const postReadInfomation = (params: any) => {
	return request({
		url: '/sysMessage/read',
		method: 'post',
		data: params,
	});
};
/**审批数据展示类型 */
//报价单 checktype=1
const getApprovalQuotation1 = (params: any) => {
	return request({
		url: '/xmBudget/detail',
		method: 'get',
		data: params,
	});
};
//材料采购 checktype=2
const getMaterialPurchase2 = (params: any) => {
	return request({
		url: '/cgPurchaseMaterial/GetDetail',
		method: 'get',
		data: params,
	});
};
//材料申请checktype=3
const getMaterialApply3 = (params: any) => {
	return request({
		url: '/cgApplyMaterial/GetDetail',
		method: 'get',
		data: params,
	});
};
//材料审核checktype=4
const getMaterialCheck4 = (params: any) => {
	return request({
		url: '/xmInfoMaterial/page',
		method: 'get',
		data: params,
	});
};
//入库单checktype=5
const getWarehousing5 = (params: any) => {
	return request({
		url: '/xmIMWarehouse/page',
		method: 'get',
		data: params,
	});
};
//采购入库单
const getCgReceiptMaterial5 = (params: any) => {
	return request({
		url: '/cgReceiptMaterial/GetDetail',
		method: 'get',
		data: params,
	});
};

//出库单checktype=7
const getRetrieval7 = (params: any) => {
	return request({
		url: '/xmEXWarehouse/page',
		method: 'get',
		data: params,
	});
};
//对账单checktype=9
const getStatement9 = (params: any) => {
	return request({
		url: '/fdCheckBill/detail',
		method: 'get',
		data: params,
	});
};
//付款单checktype=10
const getPay10 = (params: any) => {
	return request({
		url: '/fdPayment/detail',
		method: 'get',
		data: params,
	});
};
//工作日报==11
const getDaily11 = (params: any) => {
	return request({
		url: '/usDailyWorkReport/page',
		method: 'get',
		data: params,
	});
};
//固定资产采购checktype=13
const getFixedAssetPurchase13 = (params: any) => {
	return request({
		url: '/cgPurchaseFixedAsset/detail',
		method: 'get',
		data: params,
	});
};

//固定资产申请checktype=14
const getFixedAssetApply14 = (params: any) => {
	return request({
		url: '/cgApplyFixedAsset/detail',
		method: 'get',
		data: params,
	});
};

//固定资产入库checktype=15
const getFixedAssetWareHouse15 = (params: any) => {
	return request({
		url: '/cgStorageFixedAsset/detail',
		method: 'get',
		data: params,
	});
};

//扣款单checktype=18
const getDeduction18 = (params: any) => {
	return request({
		url: '/xmCutPay/detail',
		method: 'get',
		data: params,
	});
};

//平台需求审核checktype=20
const getDemand20 = (params: any) => {
	return request({
		url: '/usDemand/page',
		method: 'get',
		data: params,
	});
};
//预付款申请23
const getAdvance23 = (params: any) => {
	return request({
		url: '/fdAdvanceCharge/detail',
		method: 'get',
		data: params,
	});
};
//研发管理-立项信息24
const getDevProjectInfo24 = (params: any) => {
	return request({
		url: '/xmProjectinfo/detail',
		method: 'get',
		data: params,
	});
};
//25业务评审
const getBussinessInfo25 = (params: any) => {
	return request({
		url: '/rmBusiness/detail',
		method: 'get',
		data: params,
	});
};
//26设计评审
const getDesignInfo26 = (params: any) => {
	return request({
		url: '/rmDesign/detail',
		method: 'get',
		data: params,
	});
};
//27成本评审
const getCostInfo27 = (params: any) => {
	return request({
		url: '/rmCost/detail',
		method: 'get',
		data: params,
	});
};
//28报价评审
const getOfferInfo28 = (params: any) => {
	return request({
		url: '/rmOffer/detail',
		method: 'get',
		data: params,
	});
};

//29开工评审
const getStartInfo29 = (params: any) => {
	return request({
		url: '/rmStartWork/detail',
		method: 'get',
		data: params,
	});
};
//30完工评审
const getCompleteInfo30 = (params: any) => {
	return request({
		url: '/rmEndWork/detail',
		method: 'get',
		data: params,
	});
};
export {
	getDemand20,
	getMaterialCheck4,
	postCheckTask,
	getCgReceiptMaterial5,
	getDeduction18,
	getPay10,
	getStatement9,
	getAdvance23,
	getDaily11,
	getWarehousing5,
	getRetrieval7,
	getFixedAssetWareHouse15,
	getFixedAssetPurchase13,
	getFixedAssetApply14,
	getChartData,
	getInfomationList,
	postReadInfomation,
	getApprovalList,
	postApprovalAction,
	getWaitInfoCount,
	getApprovalQuotation1,
	getMaterialPurchase2,
	getMaterialApply3,
	getDevProjectInfo24,
	getBussinessInfo25,
	postProjectReviewAction,
	getDesignInfo26,
	getCostInfo27,
	getOfferInfo28,
	getStartInfo29,
	getCompleteInfo30
};
